﻿@inject IPageHeadBuilder pagebuilder
@model PasswordRecoveryConfirmModel
@{
    Layout = "_SingleColumn";

    //title
    pagebuilder.AddTitleParts(Loc["Title.PasswordRecovery"]);
}
<div class="page password-recovery-page">
    <h1 class="generalTitle h2">@Loc["Account.PasswordRecovery"]</h1>
    @if (!string.IsNullOrEmpty(Model.Result))
    {
        <div class="alert alert-info mt-3">@Model.Result</div>
    }
    @if (!Model.DisablePasswordChanging)
    {
        <form asp-route="PasswordRecoveryConfirm" asp-route-token="@HtmlExtensions.HtmlEncodeSafe(Context.Request.Query["token"])" asp-route-email="@HtmlExtensions.HtmlEncodeSafe(Context.Request.Query["email"])" method="post" autocomplete="off">
            <div asp-validation-summary="All" class="message-error"></div>
            <div class="form-fields">
                <div class="inputs">
                    <label asp-for="NewPassword" class="col-form-label">@Loc["Account.PasswordRecovery.NewPassword"]:</label>
                    <input asp-for="NewPassword" class="form-control" data-val-required=@Loc["Account.PasswordRecovery.NewPassword.Required"]/>
                    <span asp-validation-for="NewPassword"></span>
                </div>
                <div class="inputs">
                    <label asp-for="ConfirmNewPassword" class="col-form-label">@Loc["Account.PasswordRecovery.ConfirmNewPassword"]:</label>
                    <input asp-for="ConfirmNewPassword" class="form-control" data-val-equalto=@Loc["Account.PasswordRecovery.NewPassword.EnteredPasswordsDoNotMatch"] data-val-required=@Loc["Account.PasswordRecovery.ConfirmNewPassword.Required"]/>
                    <span asp-validation-for="ConfirmNewPassword"></span>
                </div>
            </div>
            <div class="row">
                <div class="col-12 text-xs-center my-3">
                    <input type="submit" name="set-password" class="btn btn-secondary new-password-button" value="@Loc["Account.PasswordRecovery.ChangePasswordButton"]"/>
                </div>
            </div>
        </form>
    }
</div>